<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"		content="width=device-width, initial-scale=1.0">
    <meta name="description"	content="">
    <meta name="author"			content="">
    
	<title><g:layoutTitle default="${meta(name:'app.name')}" /></title>
	<link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
	
	<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
	<!--[if lt IE 9]>
	  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	
	<link rel="stylesheet" href="${resource(dir:'bootstrap/css',file:'bootstrap.css')}" />
	<link rel="stylesheet" href="${resource(dir:'bootstrap/css',file:'bootstrap-responsive.css')}" />
	<link rel="stylesheet" href="${resource(dir:'kickstart/css',file:'docs.css')}" />
	<link rel="stylesheet" href="${resource(dir:'kickstart/css',file:'kickstart.css')}" />

    <link rel="apple-touch-icon" href="assets/ico/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="assets/ico/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="assets/ico/apple-touch-icon-114x114.png">
    
    
	
    <!-- Note: Place at the end of the document to load faster -->
    <script src="${resource(dir:'js/jquery',file:'jquery-1.7.2.min.js')}"></script>
    <script src="${resource(dir:'bootstrap/js',file:'bootstrap.js')}"></script>

    
    <script src="${resource(dir:'js/ko',file:'knockout.js')}"></script>
    <script src="${resource(dir:'js/ko',file:'knockout.mapping.js')}"></script>
    <script src="${resource(dir:'js/ko',file:'ko.jquery.js')}"></script>
    

    <g:render template="/layouts/main_js" />
    
    
    <g:layoutHead />
    
	<r:layoutResources />
</head>

<body>
    
    
    <bootstrap:fixedNavBar id="Navbar">
            
        <bootstrap:logo id="main_logo" />
        
        <ul class="nav">
						<li class="dropdown">
						
							<a class="dropdown-toggle" 
							   data-toggle="dropdown" 
							   href="#">Browse <b class="caret"></b>
							</a>
							
							<ul class="dropdown-menu">
			                    <g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
			                    <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName.substring(c.fullName.lastIndexOf('.')+1)}</g:link></li>
			                    </g:each>
							</ul>
							
						</li>
		</ul>
		
		
		
		<bootstrap:dropDown title="Novo Menu" id="nm1">
		   <bootstrap:dropDownItem>
		     Primeiro Item
		   </bootstrap:dropDownItem>
		   
		   <bootstrap:dropDownSeparator />
		   
		   <bootstrap:dropDownItem title="Segundo Item" icon="icon-user" />
		</bootstrap:dropDown>
		
		
		<g:if test="${ pageProperty(name:'page.header') }">
   		   <g:pageProperty name="page.addOnMenu" />
	    </g:if>
		
        <g:render template="/menu/language"/>														
		<g:render template="/menu/info"/>
					
          
        <div class="pull-right"> 
        
            <ul class="nav">
						<li class="dropdown">
						
							<a class="dropdown-toggle" 
							   data-toggle="dropdown" 
							   href="#"> <i class="icon-user icon-white"></i> Helder Morais <b class="caret"></b>
							</a>
							
							<ul class="dropdown-menu">
			                    <g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
			                    <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName.substring(c.fullName.lastIndexOf('.')+1)}</g:link></li>
			                    </g:each>
							</ul>
							
						</li>
		    </ul>
																	
																	
        </div>
				
				
		<div class="pull-right">

           <!-- input type="text" class="input-medium search-query logo" -->        
           <bootstrap:searchBox id="globalSearchBox" />        
        
        </div>					
    </bootstrap:fixedNavBar>
    
    <g:render template="/layouts/pageHeader" />
    
    
	<div id="Content" class="container">
		<%-- Only show the "Pills" navigation menu if a controller exists (but not for home) --%>
		<g:if test="${	params.controller != null
					&&	params.controller != ''
					&&	params.controller != 'home'
		}">
			<ul id="Menu" class="nav nav-pills">
		        <g:set var="entityName" value="${message(code: params.controller+'.label', default: params.controller.substring(0,1).toUpperCase() + params.controller.substring(1).toLowerCase())}" />
		        <%-- Set which "pill" of the menu is active --%>
				<li class="${ params.action == "list" ? 'active' : '' }">
					<g:link action="list"><g:message code="default.list.label" args="[entityName]"/></g:link>
				</li>
				<li class="${ params.action == "create" ? 'active' : '' }">
					<g:link action="create"><g:message code="default.new.label"  args="[entityName]"/></g:link>
				</li>
			</ul>
        </g:if>
                        
        <g:if test="${flash.message}">
            <div class="alert alert-info">${flash.message}</div>
        </g:if>
            
		<g:layoutBody />
        <g:pageProperty name="page.body" />
	</div>


	<g:render template="/layouts/pageFooter" />


		
    <r:layoutResources />
</body>

</html>